-- GENERATED SPELL FOR [Scarlet Initiate] --


function spell0_1507(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20793,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1507', 3000, 1)
end

function spell1_1507(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1507', 0, 1)
end

function Sorts_1507(pUnit, Event)
local choix_sorts_1507 = math.random(0, 1)
if choix_sorts_1507 == 0 then
pUnit:RegisterEvent('spell0_1507', 1, 1)
end
if choix_sorts_1507 == 1 then
pUnit:RegisterEvent('spell1_1507', 1, 1)
end
end

function mob1507_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1507', math.random(1500, 3000), 1)
end

function mob1507_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1507_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1507_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1507, 1, 'mob1507_Action')
RegisterUnitEvent(1507, 2, 'mob1507_Leave')
RegisterUnitEvent(1507, 3, 'mob1507_Kill')
RegisterUnitEvent(1507, 4, 'mob1507_Die')
